#include "basicLayer.h"
#include "SimpleAudioEngine.h"

void BasicLayer::init()
{
	this->createBackgroundSprite();

	if (m_strBackgroundMusic.length() > 0)
	{
		CocosDenshion::SimpleAudioEngine::sharedEngine()->preloadBackgroundMusic(m_strBackgroundMusic.c_str());
		CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic(m_strBackgroundMusic.c_str());
	}
}

BasicLayer::~BasicLayer()
{
	if (m_strBackgroundMusic.length() > 0)
	{
		CocosDenshion::SimpleAudioEngine::sharedEngine()->stopBackgroundMusic();
	}
}

void BasicLayer::createBackgroundSprite()
{

}